namespace VAdvantage.Model
{

/** Generated Model - DO NOT CHANGE */
using System;
using System.Text;
using VAdvantage.DataBase;
using VAdvantage.Common;
using VAdvantage.Classes;
using VAdvantage.Process;
using VAdvantage.Model;
using VAdvantage.Utility;
using System.Data;
/** Generated Model for AD_ModuleInfo
 *  @author Jagmohan Bhatt (generated) 
 *  @version Vienna Framework 1.1.1 - $Id$ */
public class X_AD_ModuleInfo : PO
{
public X_AD_ModuleInfo (Context ctx, int AD_ModuleInfo_ID, String trxName) : base (ctx, AD_ModuleInfo_ID, trxName)
{
/** if (AD_ModuleInfo_ID == 0)
{
SetAD_ModuleInfo_ID (0);
}
 */
}
public X_AD_ModuleInfo (Ctx ctx, int AD_ModuleInfo_ID, String trxName) : base (ctx, AD_ModuleInfo_ID, trxName)
{
/** if (AD_ModuleInfo_ID == 0)
{
SetAD_ModuleInfo_ID (0);
}
 */
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_AD_ModuleInfo (Context ctx, DataRow rs, String trxName) : base(ctx, rs, trxName)
{
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_AD_ModuleInfo (Ctx ctx, DataRow rs, String trxName) : base(ctx, rs, trxName)
{
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_AD_ModuleInfo (Ctx ctx, IDataReader dr, String trxName) : base(ctx, dr, trxName)
{
}
/** Static Constructor 
 Set Table ID By Table Name
 added by ->Harwinder */
static X_AD_ModuleInfo()
{
 Table_ID = Get_Table_ID(Table_Name);
 model = new KeyNamePair(Table_ID,Table_Name);
}
/** Serial Version No */
static long serialVersionUID = 27622811861547L;
/** Last Updated Timestamp 6/26/2012 10:25:45 AM */
public static long updatedMS = 1340686544758L;
/** AD_Table_ID=1000054 */
public static int Table_ID;
 // =1000054;

/** TableName=AD_ModuleInfo */
public static String Table_Name="AD_ModuleInfo";

protected static KeyNamePair model;
protected Decimal accessLevel = new Decimal(7);
/** AccessLevel
@return 7 - System - Client - Org 
*/
protected override int Get_AccessLevel()
{
return Convert.ToInt32(accessLevel.ToString());
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected override POInfo InitPO (Context ctx)
{
POInfo poi = POInfo.GetPOInfo (ctx, Table_ID);
return poi;
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected override POInfo InitPO (Ctx ctx)
{
POInfo poi = POInfo.GetPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public override String ToString()
{
StringBuilder sb = new StringBuilder ("X_AD_ModuleInfo[").Append(Get_ID()).Append("]");
return sb.ToString();
}
/** Set Module.
@param AD_ModuleInfo_ID Module */
public void SetAD_ModuleInfo_ID (int AD_ModuleInfo_ID)
{
if (AD_ModuleInfo_ID < 1) throw new ArgumentException ("AD_ModuleInfo_ID is mandatory.");
Set_ValueNoCheck ("AD_ModuleInfo_ID", AD_ModuleInfo_ID);
}
/** Get Module.
@return Module */
public int GetAD_ModuleInfo_ID() 
{
Object ii = Get_Value("AD_ModuleInfo_ID");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set Author.
@param Author Author/Creator of the Entity */
public void SetAuthor (String Author)
{
if (Author != null && Author.Length > 100)
{
log.Warning("Length > 100 - truncated");
Author = Author.Substring(0,100);
}
Set_Value ("Author", Author);
}
/** Get Author.
@return Author/Creator of the Entity */
public String GetAuthor() 
{
return (String)Get_Value("Author");
}
/** Set Business Partner .
@param C_BPartner_ID Identifies a Business Partner */
public void SetC_BPartner_ID (int C_BPartner_ID)
{
if (C_BPartner_ID <= 0) Set_Value ("C_BPartner_ID", null);
else
Set_Value ("C_BPartner_ID", C_BPartner_ID);
}
/** Get Business Partner .
@return Identifies a Business Partner */
public int GetC_BPartner_ID() 
{
Object ii = Get_Value("C_BPartner_ID");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set Prepare Export Database Schema.
@param DatabaseSchema Prepare Export Database Schema */
public void SetDatabaseSchema (String DatabaseSchema)
{
if (DatabaseSchema != null && DatabaseSchema.Length > 50)
{
log.Warning("Length > 50 - truncated");
DatabaseSchema = DatabaseSchema.Substring(0,50);
}
Set_Value ("DatabaseSchema", DatabaseSchema);
}
/** Get Prepare Export Database Schema.
@return Prepare Export Database Schema */
public String GetDatabaseSchema() 
{
return (String)Get_Value("DatabaseSchema");
}
/** Set Dependency Information.
@param DependencyInfo Dependency Information */
public void SetDependencyInfo (String DependencyInfo)
{
if (DependencyInfo != null && DependencyInfo.Length > 200)
{
log.Warning("Length > 200 - truncated");
DependencyInfo = DependencyInfo.Substring(0,200);
}
Set_Value ("DependencyInfo", DependencyInfo);
}
/** Get Dependency Information.
@return Dependency Information */
public String GetDependencyInfo() 
{
return (String)Get_Value("DependencyInfo");
}
/** Set Description.
@param Description Optional short description of the record */
public void SetDescription (String Description)
{
if (Description != null && Description.Length > 200)
{
log.Warning("Length > 200 - truncated");
Description = Description.Substring(0,200);
}
Set_Value ("Description", Description);
}
/** Get Description.
@return Optional short description of the record */
public String GetDescription() 
{
return (String)Get_Value("Description");
}

/** DevelopmentStatus AD_Reference_ID=1000011 */
public static int DEVELOPMENTSTATUS_AD_Reference_ID=1000011;
/** Beta Release = B */
public static String DEVELOPMENTSTATUS_BetaRelease = "B";
/** Release/Completed = C */
public static String DEVELOPMENTSTATUS_ReleaseCompleted = "C";
/** InProcess = P */
public static String DEVELOPMENTSTATUS_InProcess = "P";
/** Is test a valid value.
@param test testvalue
@returns true if valid **/
public bool IsDevelopmentStatusValid (String test)
{
return test == null || test.Equals("B") || test.Equals("C") || test.Equals("P");
}
/** Set Development Status.
@param DevelopmentStatus Development Status */
public void SetDevelopmentStatus (String DevelopmentStatus)
{
if (!IsDevelopmentStatusValid(DevelopmentStatus))
throw new ArgumentException ("DevelopmentStatus Invalid value - " + DevelopmentStatus + " - Reference_ID=1000011 - B - C - P");
if (DevelopmentStatus != null && DevelopmentStatus.Length > 2)
{
log.Warning("Length > 2 - truncated");
DevelopmentStatus = DevelopmentStatus.Substring(0,2);
}
Set_Value ("DevelopmentStatus", DevelopmentStatus);
}
/** Get Development Status.
@return Development Status */
public String GetDevelopmentStatus() 
{
return (String)Get_Value("DevelopmentStatus");
}
/** Set Free.
@param IsFree Free */
public void SetIsFree (Boolean IsFree)
{
Set_Value ("IsFree", IsFree);
}
/** Get Free.
@return Free */
public Boolean IsFree() 
{
Object oo = Get_Value("IsFree");
if (oo != null) 
{
 if (oo.GetType() == typeof(bool)) return Convert.ToBoolean(oo);
 return "Y".Equals(oo);
}
return false;
}
/** Set Paid.
@param IsPaid The document is paid */
public void SetIsPaid (Boolean IsPaid)
{
Set_Value ("IsPaid", IsPaid);
}
/** Get Paid.
@return The document is paid */
public Boolean IsPaid() 
{
Object oo = Get_Value("IsPaid");
if (oo != null) 
{
 if (oo.GetType() == typeof(bool)) return Convert.ToBoolean(oo);
 return "Y".Equals(oo);
}
return false;
}
/** Set Name.
@param Name Alphanumeric identifier of the entity */
public void SetName (String Name)
{
if (Name != null && Name.Length > 100)
{
log.Warning("Length > 100 - truncated");
Name = Name.Substring(0,100);
}
Set_Value ("Name", Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity */
public String GetName() 
{
return (String)Get_Value("Name");
}
/** Set NameSpace.
@param NameSpace NameSpace */
public void SetNameSpace (String NameSpace)
{
if (NameSpace != null && NameSpace.Length > 50)
{
log.Warning("Length > 50 - truncated");
NameSpace = NameSpace.Substring(0,50);
}
Set_Value ("NameSpace", NameSpace);
}
/** Get NameSpace.
@return NameSpace */
public String GetNameSpace() 
{
return (String)Get_Value("NameSpace");
}
/** Set Prefix Folder Path.
@param Path Prefix Folder Path */
public void SetPath (String Path)
{
if (Path != null && Path.Length > 200)
{
log.Warning("Length > 200 - truncated");
Path = Path.Substring(0,200);
}
Set_Value ("Path", Path);
}
/** Get Prefix Folder Path.
@return Prefix Folder Path */
public String GetPath() 
{
return (String)Get_Value("Path");
}
/** Set Prefix.
@param Prefix Prefix before the sequence number */
public void SetPrefix (String Prefix)
{
if (Prefix != null && Prefix.Length > 50)
{
log.Warning("Length > 50 - truncated");
Prefix = Prefix.Substring(0,50);
}
Set_Value ("Prefix", Prefix);
}
/** Get Prefix.
@return Prefix before the sequence number */
public String GetPrefix() 
{
return (String)Get_Value("Prefix");
}
/** Set Term & Condition.
@param TermCondition Term & Condition */
public void SetTermCondition (String TermCondition)
{
if (TermCondition != null && TermCondition.Length > 200)
{
log.Warning("Length > 200 - truncated");
TermCondition = TermCondition.Substring(0,200);
}
Set_Value ("TermCondition", TermCondition);
}
/** Get Term & Condition.
@return Term & Condition */
public String GetTermCondition() 
{
return (String)Get_Value("TermCondition");
}
/** Set URL.
@param URL Full URL address - e.g. http://www.viennaadvantage.com */
public void SetURL (String URL)
{
if (URL != null && URL.Length > 100)
{
log.Warning("Length > 100 - truncated");
URL = URL.Substring(0,100);
}
Set_Value ("URL", URL);
}
/** Get URL.
@return Full URL address - e.g. http://www.viennaadvantage.com */
public String GetURL() 
{
return (String)Get_Value("URL");
}
/** Set Upgrade Information.
@param UpgradeInfo Upgrade Information */
public void SetUpgradeInfo (String UpgradeInfo)
{
if (UpgradeInfo != null && UpgradeInfo.Length > 200)
{
log.Warning("Length > 200 - truncated");
UpgradeInfo = UpgradeInfo.Substring(0,200);
}
Set_Value ("UpgradeInfo", UpgradeInfo);
}
/** Get Upgrade Information.
@return Upgrade Information */
public String GetUpgradeInfo() 
{
return (String)Get_Value("UpgradeInfo");
}
/** Set Version ID.
@param VersionID Version ID */
public void SetVersionID (Decimal? VersionID)
{
Set_Value ("VersionID", (Decimal?)VersionID);
}
/** Get Version ID.
@return Version ID */
public Decimal GetVersionID() 
{
Object bd =Get_Value("VersionID");
if (bd == null) return Env.ZERO;
return  Convert.ToDecimal(bd);
}
/** Set Version No.
@param VersionNo Version Number */
public void SetVersionNo (String VersionNo)
{
if (VersionNo != null && VersionNo.Length > 50)
{
log.Warning("Length > 50 - truncated");
VersionNo = VersionNo.Substring(0,50);
}
Set_Value ("VersionNo", VersionNo);
}
/** Get Version No.
@return Version Number */
public String GetVersionNo() 
{
return (String)Get_Value("VersionNo");
}
}

}
